// Echarts图表字体、间距自适应
import { PC_BASE_WIDTH, PC_BASE_HEIGHT } from "./commonSize";
export const fitChartSize = (size: number, defalteWidth = PC_BASE_WIDTH) => {
  let clientWidth =
    window.innerWidth ||
    document.documentElement.clientWidth ||
    document.body.clientWidth;
  if (!clientWidth) return size;
  let scale = clientWidth / defalteWidth;
  return Number((size * scale).toFixed(3));
};
